﻿using System;

namespace EvaluationSystem
{
    public partial class Introduce : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["isTesting"] == null)//如果没有输入序列号，则禁止访问此页面
                {
                    Response.Redirect("Tlogin.aspx");
                }

                if (Request.QueryString["weltext"] != null)
                {
                    txtPart0.Text = Request.QueryString["weltext"].ToString();
                }

                if (Request.QueryString["logopath"] != null)
                {
                    if (string.IsNullOrEmpty(Request.QueryString["logopath"]))
                    {
                        usrLogo.ImageUrl = "~/images/5050.jpg";
                        usrLogo.Visible = false;
                    }
                    else
                    {
                        usrLogo.ImageUrl = Request.QueryString["logopath"].ToString().Replace("\\", "/");
                    }
                }

                if (Request.QueryString["atext"] != null)
                {
                    txtPart1.Text += Request.QueryString["atext"].ToString();
                }

                if (Request.QueryString["ctext"] != null)
                {
                    txtPart2.Text += Environment.NewLine + Environment.NewLine
                                    + Request.QueryString["ctext"].ToString();
                }
            }
        }

        protected void btnEnterTest_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Response.Redirect("Notice.aspx?guid=" +Request.QueryString["guid"]
                                                      + "&logopath=" + Request.QueryString["logopath"].Replace("\\","/"));
        }
    }
}